<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta charset="utf-8">
  <title>Lazy Load Images After 5 Second Timeout</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="jquery-1.8.0.js"></script>
  <script src="jquery.lazyload.js?v=1.9.1"></script>
   <script src="jquery.scrollstop.js"></script>
  <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
  <![endif]-->
  <style type="text/css">
    .container img {
      margin-bottom: 10px;
    }
	
	.container .no_img_coming{background:url(img/grey.gif) no-repeat; background-position:center;}
	
  </style>
</head>

<body>   
  <div class="container">
    <div class="col-md-10 col-lg-8 col-md-offset-1 col-lg-offset-2">
      
      <h2>Load images after five second delay</h2>
      <p>
        Here <a href="http://www.appelsiini.net/projects/lazyload">Lazy Load</a> 
        plugin is enabled. Images are not loaded. Timeout will trigger five seconds after 
        all other elements of page have been loaded. 
      </p>
      <pre class="prettyprint">$(function() {          
    $("img.lazy").lazyload({
        event : "sporty"
    });
});
 
$(window).bind("load", function() { 
    var timeout = setTimeout(function() { $("img.lazy").trigger("sporty") }, 10);
});      </pre>

     <pre class="prettyprint">&lt;img class="lazy" src="img/grey.gif" data-original="img/example.jpg" width="765" height="574"&gt;</pre>
     
      <div id="container">
        <img class="lazy" data-original="http://zcimg.zcool.com.cn/zcimg/c_m_046b53ba7043000001626bf8bf43.jpg"  width="400" height="300" alt="BMW M1 Hood"><br/>
        <img class="lazy img-responsive"  data-original="img/bmw_m1_side.jpg" width="765" height="574" alt="BMW M1 Side"><br/>
        <img class="lazy img-responsive"  data-original="img/viper_1.jpg" width="765" height="574" alt="Viper 1"><br/>
        <img class="lazy img-responsive"  data-original="img/viper_corner.jpg" width="765" height="574" alt="Viper Corner"><br/>
        <img class="lazy img-responsive"  data-original="img/bmw_m3_gt.jpg" width="765" height="574" alt="BMW M3 GT"><br/>
        <img class="lazy img-responsive"  data-original="img/corvette_pitstop.jpg" width="765" height="574" alt="Corvette Pitstop"><br/>      
		
		<div class="lazy" data-original="http://zcimg.zcool.com.cn/zcimg/c_m_046b53ba7043000001626bf8bf43.jpg" style="width:200px; height:200px; border:1px solid red;">
			fsfsfs
		</div>
	  
	</div>
	  
	  
	  
	 
	  
	  
    </div>
  </div>
<script type="text/javascript" charset="utf-8">
	
	/* 延迟五秒加载
	$(function() {          
		$(".lazy").lazyload({
			event : "sporty"
		});
	});
	$(window).bind("load", function() { 
		var timeout = setTimeout(function() { $(".lazy").trigger("sporty"); }, 2000);
	});
	*/
	
	/* 预加载200像素
	$(function() {
	   $(".lazy").lazyload({ threshold : 200 });
	});
	*/
	
	/* 滚动加载 */
	$(function() {
        $(".lazy").lazyload({
            event: "scrollstop"
        });
    });
			  
</script>
</body>
</html>
